-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Always traverse Inlined.call in linter #24043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I wonder if there is something missing before we can merge that? I'd like to backport this change to 3.7.4-RC2 as it would make the semi-automatic migrations under |
I'll mark it ready today, as I have more experience with inlined positions. Edit: So akshually, when reporting, it builds the outer chain for inlined positions from the context, which knows about It seems to be more precise than the mechanism in the linter. Moreover, the only position test is whether the "outermost" (last of |
Previously it incorrectly only looked at call after typer, but it must also look at call after inlining, for intermediate expansions which are not directly written by user.
For reference, the inlined call and bindings
and expansion
where the but Perhaps there would be greater fidelity by checking everything and only restricting import lookups to |
891100e
to
a536a1b
Compare
If the PR is still open, I'll try the improvement from the last comment, something about check all code but restrict import lookups to |
Finally edited the rooted imports inherited from previous code. It would be nice if we got improved syntax. Always resolve, but pass a flag to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Obsolete comment: I added names to the iron givens to make it easier to find them in The mechanism of a stack of inlined positions, used to control name look-ups, needs further research or investigation. It's needed for the commented existing test. Speculating that the useful distinction is between the call of a top-most |
Previously it incorrectly only looked at call after typer, but it must also look at call after inlining, for intermediate expansions which are not directly written by user.
Fixes #24034